home *** CD-ROM | disk | FTP | other *** search
- infected=0
- filename$="c:\commaddn\command.com"
- notouch$="command"
- gosub do_not_touch:
- print file_name$
- print infected
- end
- do_not_touch:
- rem Make sure the following files are NOT infected or
- rem otherwise tampered with. This routine actually
- rem seperates the filename from its path and extension
- rem then proceeds to compare it.
- a$=filename$
- b=len(a$)
- b=b-4
- b$=left$(a$,b)
- print b$
- b=len(b$)
- d=varptr(b$)
- c=d+b
- e=-1
- exit=0
- while exit=0
- a=peek(c)
- a$=chr$(a)
- if a$="\" then
- exit=1
- else
- e=e+1
- c=c-1
- endif
- wend
- file_name$=right$(b$,e)
- file_name$=ucase$(file_name$)
- notouch$=ucase$(notouch$)
- b=instr(file_name$,notouch$)
- if b>0 then
- infected=1
- endif
- return
-